/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fallen.deck.entity;

/**
 *
 * @author MotorolaUTN
 */
public class Frequency {
    
    private String name, color;
    private long id;

    /**
     * @return the id
     */
    public long getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(long id) {
        this.id = id;
    }
    
    public Frequency(String name, String color)
    {
        this.name = name;
        this.color = color;
    }
    
    public Frequency(String name)
    {
        this.name = name;
        this.color = "";
    }

     public Frequency()
    {
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the color
     */
    public String getColor() {
        return color;
    }

    /**
     * @param color the color to set
     */
    public void setColor(String color) {
        this.color = color;
    }

    public String toString()
    {
        return name;
    }
    
    public int compareTo(Object o)
    {
        if (!(o instanceof Frequency)) return -1;
        return ((Frequency)o).getName().compareTo(name);
    }
}
